#ifndef SCANNER_H_INCLUDED
#define SCANNER_H_INCLUDED

#include <stdio.h>
#include <stdlib.h>
#include "GCCMakros.h"
#include <time.h>

#define TIMES   1
#define DIV     2
#define MOD     3
#define AND     4
#define PLUS    5
#define MINUS   6
#define OR      7
#define EQL     8
#define NEQ     9
#define LSS     10
#define LEQ     11
#define GRT     12
#define GEQ     13
#define PERIOD  14
#define ARROW   15
#define COMMA   16
#define COLON   17
#define RBRACE  18
#define RBRAK   19
#define RPAREN  20
#define LBRACE  21
#define LBRAK   22
#define LPAREN  23
#define NOT     24
#define BECOME  25
#define BOOL    26
#define NUMBER  27
#define CONST   28
#define CHAR    29
#define IDENT   30
#define TYPE    31
#define PTR     32
#define STRING  33
#define ELSE    34
#define ELIF    35
#define IF      36
#define WHILE   37
#define STRUCT  38
#define TYP     39
#define FUNC    40
#define INVOL   41
#define SEQ     42
#define ENDF    43
#define UNKN    44

#define KEYTABLENGTH    19


struct key
{
    int sym;
    int length;
    char value[50];
    int line;
    int column;
};

int         colCounter;
int         lnCounter;
int         read;
char        current;
char        value[KEYTABLENGTH];
FILE ptr    file;
FILE ptr    log;

int         errCount;


struct key     keyTab[19];
int            keyTabLength;
struct key     curKey;

function initScanner(char filename[]);
function clearScanner();
function get();
function printSymInfo();
function nextChar();
function keyword();
function forgetSpaces();
function skipComment();
function checkPos();
function string();
function initKeyTab();
function mark(char msg[], int err);
char ptr getCurValue();

#endif // SCANNER_H_INCLUDED
